/**
 ******************************************************************************
 * @file    gps.c
 * @brief   gps program body
 ******************************************************************************
 * @attention
 ******************************************************************************
 */
/* includes ------------------------------------------------------------------*/
#include "gps.h"
/* Private includes ----------------------------------------------------------*/
#include "at6558r.h"
#include "delay.h"

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private user code ---------------------------------------------------------*/
/**
 * @brief GPS初始化
 * @param
 * @return
 */
void GPS_Init(void)
{
	AT6558R_Init();
	Delay_ms(100);
}

/**
 * @brief 获取GPS定位数据
 * @param
 * @return
 */
void GPS_GetLocation(uint8_t *location)
{
	AT6558R_ReceiveData(location);
}

/**
 * @brief GPS进入低功耗模式
 * @param
 * @return
 */
void GPS_EnterLowPowerMode(void)
{
	AT6558R_EnterBatteryBackupMode();
	Delay_ms(100);
}

/**
 * @brief GPS退出低功耗模式
 * @param
 * @return
 */
void GPS_ExitLowPowerMode(void)
{
	AT6558R_ExitBatteryBackupMode();
	Delay_ms(100);
}
